<?php
/**
 * Display list of attached mission
 * 
 */
use Fox\Html\AnchorObject;
use Fox\Generator;
$ressourceid = Xview::instance()->val("ressourceid",Xview::instance()->val("ressource_id"));
$block = new Fox\Html\Block("bMissions",Msg(Hive::BUNDLE,32));
$grid = new Fox\Grid("gMissions");
$grid->fieldcat(array(array("mission_title","title"),"idele"));
$grid->fieldcat()->switchToObjectMode();
$grid->fieldcat()
		->field("title")
			->setAnchor(new AnchorObject("?mod=missions&act=update",array(
					'missionid' => Fox\Generator::useAttribute())
				,"_blank"));	
$grid->fieldcat()->setGenerators(array(
	'idele' => Fox\Generator::ajaxReload(
					'missionsWindow',
					Generator::url( "ressource",
									"missions",
									"remove",
									array("missionid" => Fox\Generator::useAttribute("missionid"),
									"ressource_id" => $ressourceid))
				)));
$block->add($grid);
$block->collapsed(false);
return $block;